<template>
  <h1>EL组件-单选</h1>
  <el-radio-group v-model="gender">
    <el-radio label="男" value="1"></el-radio>
    <el-radio label="女" value="0"></el-radio>
  </el-radio-group>
  <h4>你要提交的值：{{gender}}</h4>
  <hr>
  <el-radio-group v-model="change">
    <el-radio label="学历：本科" value="bk"></el-radio>
    <el-radio label="学历：大专" value="dz"></el-radio>
    <el-radio label="学历：高中" value="gz"></el-radio>
    <el-radio label="学历：初中" value="cz"></el-radio>
  </el-radio-group>
  <h4>您选择的结果是：{{change}}</h4>
  <hr>
  <el-radio-group v-model="dress">
    <el-radio label="地点：山西" value="sx"></el-radio>
    <el-radio label="地点：北京" value="bj"></el-radio>
    <el-radio label="地点：甘肃" value="gs"></el-radio>
    <el-radio label="地点：新疆" value="xj"></el-radio>
  </el-radio-group>
  <h4>您来自的地方是：{{dress}}</h4>
  <hr>
  <el-radio-group v-model="level">
    <el-radio label="员工" value="yg"></el-radio>
    <el-radio label="经理" value="jl"></el-radio>
    <el-radio label="总监" value="zj"></el-radio>
    <el-radio label="总裁" value="zc"></el-radio>
  </el-radio-group>
  <h4>您选择的职位是：{{level}}</h4>
  <hr>
  <el-radio-group v-model="level">
    <el-radio v-for="item in arr" :label="item.level" :value="item.value"></el-radio>
  </el-radio-group>
  <h4>您的职位是：{{level}}</h4>
  <hr>
  <el-radio-group v-model="pr">
    <el-radio-button v-for="item in arr2" :label="item.title" :value="item.price"></el-radio-button>
  </el-radio-group>
  <h4>您选择的酒的价格是：{{pr}}</h4>
  <el-radio-group v-model="pr3">
    <el-radio-button v-for="item in arr3" :label="item.title" :value="item.price"></el-radio-button>
  </el-radio-group>
  <h4>您选择的酒的价格是：{{pr3}}</h4>

</template>

<script setup>
import {ref} from "vue";

const gender = ref('1');
const change = ref('');
const dress = ref('gs');
const level = ref('');

const arr = ref([
  {level:'员工',value:'10'},
  {level:'经理',value:'20'},
  {level:'总监',value:'30'},
  {level:'总裁',value:'40'},
  {level:'CEO',value:'50'},
])
const pr = ref(2500)
const arr2 = ref([
  {title:'五粮液',price:5000},
  {title:'茅台',price:2500},
  {title:'汾酒',price:330},
  {title:'梦之蓝',price:368},
])
const pr3 = ref()
const arr3 = ref([
  {title:'五粮液',price:'2355'},
  {title:'茅台',price:'4366'},
  {title:'汾酒',price:'345'},
  {title:'梦之蓝',price:'355'},
])
</script>

<style scoped>

</style>